package com.ruoyi.Sign.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.Sign.mapper.SignMapper;
import com.ruoyi.Sign.domain.Sign;
import com.ruoyi.Sign.service.ISignService;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.core.text.Convert;

/**
 * 签到 服务层实现
 * 
 * @author ruoyi
 * @date 2019-09-05
 */
@Service
public class SignServiceImpl implements ISignService 
{
	@Autowired
	private SignMapper signMapper;

	/**
     * 查询签到信息
     * 
     * @param id 签到ID
     * @return 签到信息
     */
    @Override
	public Sign selectSignById(Integer id)
	{
	    return signMapper.selectSignById(id);
	}
	
	/**
     * 查询签到列表
     * 
     * @param sign 签到信息
     * @return 签到集合
     */
	@Override
	@DataScope(tableAlias = "u")
	public List<Sign> selectSignList(Sign sign)
	{
	    return signMapper.selectSignList(sign);
	}
	
    /**
     * 新增签到
     * 
     * @param sign 签到信息
     * @return 结果
     */
	@Override
	public int insertSign(Sign sign)
	{
	    return signMapper.insertSign(sign);
	}
	
	/**
     * 修改签到
     * 
     * @param sign 签到信息
     * @return 结果
     */
	@Override
	public int updateSign(Sign sign)
	{
	    return signMapper.updateSign(sign);
	}

	/**
     * 删除签到对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteSignByIds(String ids)
	{
		return signMapper.deleteSignByIds(Convert.toStrArray(ids));
	}
	
}
